#include "Rectangle.h"

Rectangle::Rectangle(const Point2D& size, const Point2D& position, uint32 background_color)
    : _background_color(background_color)
{
    offset.x = position.GetX();
    offset.y = position.GetY();
    offset.w = size.GetX();
    offset.h = size.GetY();
}

Rectangle::~Rectangle()
{
}

void Rectangle::Render(SDL_Surface* screen)
{
    SDL_FillRect(screen,&offset,_background_color);
}

int Rectangle::GetX() const
{
    return offset.x;
}

int Rectangle::GetY() const
{
    return offset.y;
}

int Rectangle::GetWidth() const
{
    return offset.w;
}

int Rectangle::GetHeight() const
{
    return offset.h;
}

